package com.tony.ai.adapter

import android.content.Context
import com.tony.ai.R
import com.tony.ai.bean.CommonBean
import com.tony.ai.databinding.ItemCommonBinding
import org.byteam.superadapter.SuperViewHolder

class CommonAdapter(var onItemClick:(pos:Int,item:CommonBean)->Unit): BaseListAdapter<CommonBean,ItemCommonBinding>(ItemCommonBinding::inflate) {
    override fun bind(binding: ItemCommonBinding, item: CommonBean, position: Int) {
        binding.tvTitle.text = item.title
        binding.tvTitle.setOnClickListener {
            onItemClick(position,item)
        }
    }
}